<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <link rel="stylesheet" href="../../css/animate.css">
  <link rel="stylesheet" href="../../iconfont/iconfont.css">
  <link rel="stylesheet" href="../../css/mescroll.css">
  <link rel="stylesheet" href="../../css/gloab.css">
  <title>红包详情</title>
  <style>
    html,body{
      width: 100%;
      height: 100%;
      overflow:hidden;
      background-image: url(../../image/personal/hongbao3.jpg);
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
    .lingbao-details-list{
      height: 310px;
      overflow: auto;
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="public-header" style="background-image:none;">
      <div id="statusbar"></div>
      <header class="public-header">
        <div class="public-header-lf iconfont icon-fanhui" @click="javascript:api.closeWin();"></div>
        <div class="public-header-title">红包详情</div>
      </header>
    </div>
    <div class="lingbao-details auto" style="background-color:#fff;margin-top:40px;">
      <div class="lingbao-details-headimg auto">
        <img v-if="res.avatar" :src="apiUrl1+res.avatar" alt="">
        <img src="../../image/public/touxiang.png" alt="" v-else>
      </div>
      <div class="lingbao-details-username">{{res.nickname}}</div>
      <div class="lingbao-details-head flex">
        <div class="lingbao-details-head-lf F2" style="text-align:right;"><span></span></div>
        <div class="lingbao-details-head-ct F1">领包详情</div>
        <div class="lingbao-details-head-lf F2" style="text-align:left;"><span></span></div>
      </div>
      <div class="lingbao-details-list">
        <div class="lingbao-details-son flex" v-for="(item,index) in list" :style="(list.length-1)==index?'border:none':''">
          <div class="lingbao-details-son-lf">
            <img style="float:left;" v-if="item.user.avatar" :src="apiUrl1+item.user.avatar" alt="">
            <img style="float:left;" src="../../image/public/touxiang.png" alt="" v-else>
          </div>
          <span style="width:80%;overflow:hidden;float:left;">{{item.user.nickname}}</span>
          <div style="float:left;" class="lingbao-details-son-rt F1">￥{{item.money}}</div>
        </div>
      </div>
    </div>
  </div>
  <div class="public-progress" style="z-index:9;">
    <img src="../../icon/icon150x150.png" alt="" class="animated infinite flash" style="width:200px;height:200px;display:block;margin:200px auto;">
  </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/jquery.js"></script>
<script src="../../script/mescroll.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/fastclick.js"></script>

<script>
var vm;
var mescroll;
var mySwiper;
apiready=function(){
  api.removeLaunchView();
  setBar("statusbar");
  setFont(750);
  startVue();
  $(".public-progress").fadeOut(1000);
  setTimeout(function(){
    $(".public-progress").css({"display":"none"});
  },1000);
}
function startVue(){
  vm = new Vue({
    el:"#app",
    data:{
      list:[],
      res:[],
    },
    created:function(){
      this.getList();
    },
    methods:{
     getList: function() {
     	api.ajax({
     		url: apiUrl + '/api/user/redpackLog',
     		method: 'post',
     		data: {
     			values: {
     				token: $api.getStorage('token'),
     				aid: api.pageParam['id']
     			},
     		}
     	}, function(ret, err) {
     		if (ret.code == 1) {
     			vm.list = ret.data.list;
				console.log(JSON.stringify(vm.list))
				vm.res=ret.data.sender;
				console.log(JSON.stringify(vm.res))
     			if (vm.list == null) {
     				vm.list = 0;
     			}
     		} else {
     			vm.list = ret.data;
				vm.res=ret.data.list.sender;
     			if (vm.list == null) {
     				vm.list = 0;
     			}
     		}
     	});
     
     },
    }
  })
}
</script>
</html>
